package com.meitianhui.convenitenbuy.http;

import android.os.Environment;

import java.io.File;

import okhttp3.Cache;

/**
 *缓存路径和大小
 */
public class HttpCache {

    private static final int HTTP_RESPONSE_DISK_CACHE_MAX_SIZE = 50 * 1024 * 1024;

    public static Cache getCache() {
        return new Cache(new File(Environment.getExternalStorageDirectory().getAbsolutePath() + File.separator + "ConvenientPurchase/NetCache"),
                HTTP_RESPONSE_DISK_CACHE_MAX_SIZE);
    }
}
